{template "content","header"}
<div class="ui-header">
		<a href="{APP_PATH}index.php?m=member&c=mobile" id="icoback" class="header-btn left-pos">返回</a>
		<h1 class="ui-title">我的会员卡</h1>
	</div>
	<div id="wrapper">
		<div class="clear" style="margin-top:30px;">

			<div style="text-align:center;margin:10px auto;">
				<div class="card">
					<img src="{IMG_PATH}card.png" />
					<p class="cardid">{$memberinfo['username']}</p>
				</div>
				<p style="font-size:14px;color:#000;font-weight:bold">消费时请出示该卡并不要关闭该页面。</p>
			</div>
			
			<div class="memberbtn">
				<a href="#">系统等待商家操作....</a>
			</div>
		</div>
		
		</div><!-- /wrapper -->
	</div>

		<script type="text/javascript">
			 {if $memberinfo['amount']<1}
				alert('您的余额不足,请先充值后才能进行消费');
				//window.location.href='{APP_PATH}index.php?m=member&c=mobile';
			{else}
				function chat_mes_get(){
						$.post("{APP_PATH}index.php?m=member&c=mobile&a=useque",{ userid: {$memberinfo['userid']},random:Math.random()}, function(data){
							//if(data=="1") {
							if(data.indexOf("suss")>=0) {
								var payid = data.replace(/suss/,"");
								window.location.href='{APP_PATH}index.php?m=member&c=mobile&a=usepay&payid='+payid;
							} 
						});
					
				}
				var gettime="";	
				 chat_mes_get();
				 window.clearInterval(gettime); 
				 gettime=window.setInterval(chat_mes_get,2000); 
			 {/if}
		</script>

</body>
</html>

{template "content","footer"}